package com.hunter2.standard.entity;

import java.util.Date;

public class Cv {
	private Integer id;

	private Integer ownerid;

	private Integer companyId;

	private Date createTime;

	private String updateTime;

	private String filename;

	private Integer source;

	private Integer processStage;

	private Integer candidateid;

	private Integer flag;

	private Integer cvfileid;

	private Integer integrity;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getOwnerid() {
		return ownerid;
	}

	public void setOwnerid(Integer ownerid) {
		this.ownerid = ownerid;
	}

	public Integer getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime == null ? null : updateTime.trim();
	}

	public String getFilename() {
		return filename;
	}

	public void setFilename(String filename) {
		this.filename = filename == null ? null : filename.trim();
	}

	public Integer getSource() {
		return source;
	}

	public void setSource(Integer source) {
		this.source = source;
	}

	public Integer getProcessStage() {
		return processStage;
	}

	public void setProcessStage(Integer processStage) {
		this.processStage = processStage;
	}

	public Integer getCandidateid() {
		return candidateid;
	}

	public void setCandidateid(Integer candidateid) {
		this.candidateid = candidateid;
	}

	public Integer getFlag() {
		return flag;
	}

	public void setFlag(Integer flag) {
		this.flag = flag;
	}

	public Integer getCvfileid() {
		return cvfileid;
	}

	public void setCvfileid(Integer cvfileid) {
		this.cvfileid = cvfileid;
	}

	public Integer getIntegrity() {
		return integrity;
	}

	public void setIntegrity(Integer integrity) {
		this.integrity = integrity;
	}

	public String write2Line(Cv cv) {
		// 25 id company_id integrity
		String line = cv.getId() + "\t" + "\\N" + "\t" + "1" + "\t" + "\\N" + "\t" + "\\N" + "\t" + "\\N" // 6
				+ "\t" + "\\N" + "\t" + "\\N" + "\t" + "\\N" + "\t" + "\\N" + "\t" + "\\N" + "\t" + "\\N" + "\t" + "\\N" // 7
				+ "\t" + "\\N" + "\t" + "\\N" + "\t" + "\\N" + "\t" + "\\N" + "\t" + "\\N" + "\t" + "\\N" + "\t" + "\\N" // 7
				+ "\t" + "\\N" + "\t" + "\\N" + "\t" + "1" + "\t" + "\\N" + "\t" + cv.getIntegrity() + "\t"+ 3; // 5

		return line;
	}

	@Override
	public String toString() {
		return "Cv [id=" + id + ", ownerid=" + ownerid + ", companyId=" + companyId + ", createTime=" + createTime
				+ ", updateTime=" + updateTime + ", filename=" + filename + ", source=" + source + ", processStage="
				+ processStage + ", candidateid=" + candidateid + ", flag=" + flag + ", cvfileid=" + cvfileid
				+ ", integrity=" + integrity + "]";
	}
}